package com.scs.application.modules.wm.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/**
 * <p>
 *
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "出入库-唯一码关联表表")
@TableName("wm_order_barcode")
@AllArgsConstructor
@NoArgsConstructor
@EntityIndexAnnotation(ux={"sn"},ix ={"work_order_item_id"})

public class OrderBarcode extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "=wm_work_order.id",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String workOrderId;

    @EntityFieldAnnotation(
            text = "=wm_work_order_item.id",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String workOrderItemId;

    @EntityFieldAnnotation(
            text = "sn",
            length = "255",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String sn;

    @EntityFieldAnnotation(
            text = "rfid",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String rfid;

    @EntityFieldAnnotation(
            text = "udi",
            length = "255",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String udi;


    //包装数量 仅在转入库时使用
    @TableField(exist = false)
    private Double packageQty;
}
